package org.dxy.domain.event.workstation;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Value;
import org.dxy.domain.event.AggregateTypeEnum;
import org.dxy.domain.event.DomainEvent;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @description: 工位已删除指定设备
 * @author: dxy
 * @createTime: 2025/6/18 23:30
 */
@Value
@Builder
@AllArgsConstructor
public class WorkstationDevicesRemovedEvent implements DomainEvent {
    Long workstationId;            // 工位ID
    List<Long> removedDeviceIds;  // 被删除的设备ID列表
    String operator;              // 操作人
    LocalDateTime occurredAt;    // 事件发生时间
    
    @Override
    public Long aggregateId() {
        return workstationId;
    }
    
    @Override
    public String aggregateType() {
        return AggregateTypeEnum.WORKSTATION.getKey();
    }
    
    @Override
    public String eventType() {
        return WorkstationEventTypeEnum.DEVICES_REMOVED.getKey();
    }
}
